package com.weiqiao.api.repository;


import com.weiqiao.base.dao.IBaseMongoDao;
import org.bson.Document;
import org.bson.conversions.Bson;

import java.util.List;

/**
 * 余额提现持久层 接口 继承IBaseMongoDao
 *
 * @author user
 */

public interface IReceiptApiRepository extends IBaseMongoDao {

    /**
     * 新增余额提现
     *
     * @param company_id
     * @param json
     * @return
     */

    public boolean addReceipt(int company_id, String json);

    /**
     * 查询余额提现
     *
     * @param company_id
     * @param filter
     * @param filterSort
     * @param skip
     * @param limit
     * @return
     */

    public List<String> findReceipt(int company_id, Bson filter, Bson filterSort, int skip, int limit);

    /**
     * 通过编号查询单个提现详情
     *
     * @param company_id
     * @param filter
     * @return
     */
    public String queryOneReceiptById(int company_id, Bson filter);

    /**
     * 通过多个编号查询提现详情
     *
     * @param company_id
     * @param filter
     * @return
     */
    public List<String> queryOneReceiptByIds(int company_id, Bson filter);

    /**
     * 修改单个
     *
     * @param company_id
     * @param filter
     * @param doc
     * @return
     */
    public boolean updateOneRecepit(int company_id, Bson filter, Document doc);

    /**
     * 修改多个
     *
     * @param company_id
     * @param filter
     * @param doc
     * @return
     */
    public boolean updateRecepits(int company_id, Bson filter, Document doc);

    int countNum(int company_id, Bson filter);
}
